package com.bjpowernode.web.resp.view;

import com.bjpowernode.api.dto.UserRechargeInfo;
import com.bjpowernode.util.CommonUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author 麦翔盛
 * @ClassName: UserRechargeInfo
 * @description: 用户充值记录
 * @date 2022/5/26 18:16
 */
public class UserRechargeView implements Serializable {
    private Integer rechargeStatus;

    private BigDecimal rechargeMoney;

    private String rechargeTime;

    public UserRechargeView() {
    }

    public UserRechargeView(UserRechargeInfo userRechargeInfo) {
        this.rechargeStatus = userRechargeInfo.getRechargeStatus();
        this.rechargeMoney = userRechargeInfo.getRechargeMoney();
        if (userRechargeInfo.getRechargeTime()!=null){
            this.rechargeTime = CommonUtils.formatDate(userRechargeInfo.getRechargeTime());
        }

    }

    public UserRechargeView(Integer rechargeStatus, BigDecimal rechargeMoney, String rechargeTime) {
        this.rechargeStatus = rechargeStatus;
        this.rechargeMoney = rechargeMoney;
        this.rechargeTime = rechargeTime;
    }

    public Integer getRechargeStatus() {
        return rechargeStatus;
    }

    public void setRechargeStatus(Integer rechargeStatus) {
        this.rechargeStatus = rechargeStatus;
    }

    public BigDecimal getRechargeMoney() {
        return rechargeMoney;
    }

    public void setRechargeMoney(BigDecimal rechargeMoney) {
        this.rechargeMoney = rechargeMoney;
    }

    public String getRechargeTime() {
        return rechargeTime;
    }

    public void setRechargeTime(String rechargeTime) {
        this.rechargeTime = rechargeTime;
    }
}
